<%--
  Created by IntelliJ IDEA.
  User: qiliping
  Date: 15/11/12
  Time: 下午9:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="paging" uri="paging-taglib" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>


<html>
<head>
    <title>投资者管理</title>
</head>
<body>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title">
            客户投资管理
            <small>投资者管理</small>
        </h3>
        <ul class="page-breadcrumb breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="${ctx}/main">
                    首页
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="${ctx}/user">
                    投资者管理
                </a>
                <i class="fa fa-angle-right"></i>
            </li>
            <li>
                <a href="#">
                    投资者管理
                </a>
            </li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div>
<!-- END PAGE HEADER-->
<!------内容区----->
<div class="main">
    <form action="${ctx}/user" method="get">
        <div class="row">
            <div class="col-md-12">
                <div class="search">
                    <div class="form-group">
                        <label class="control-label">手机号：</label>
                        <input type="text" name="phone" value="${phone}" class="form-control form-control-inline"/>
                    </div>

                    <div class="form-group">
                        <label class="control-label">注册时间：</label>

                        <div class="date-control small">
                            <div class="input-daterange input-group">
                                <input type="text" class="form-control fromdatetime col-md-3" size="16" value="${stime}"
                                       name="stime">
                                <span class="input-group-addon"> - </span>
                                <input type="text" class="form-control todatetime col-md-3" size="16" value="${etime}"
                                       name="etime">
                            </div>
                        </div>
                    <span class="actions">
                        <input class="btn blue" type="submit" value="搜索"/>
                    </span>
                    </div>
                </div>
            </div>
        </div>

<%--        <div class="row">
            <div class="col-md-12">
                <div class="text-right">
                    <div data-toggle="buttons" class="btn-group status-filter">
                        <label class="btn btn-default active">
                            <input type="radio" class="toggle" checked> 所有 </label>
                        <label class="btn btn-default">
                            <input type="radio" class="toggle"> 待审核 </label>
                        <label class="btn btn-default">
                            <input type="radio" class="toggle"> 已认证 </label>
                        <label class="btn btn-default">
                            <input type="radio" class="toggle"> 未通过 </label>
                    </div>
                </div>
            </div>
        </div>--%>

        <div class="row">
            <div class="col-md-12">
                <table class="table table-striped table-hover zqy-table">
                    <thead>
                    <tr>
                        <th>ID</th>

                        <th>客户姓名</th>
                        <th>手机号</th>
                        <th>客户身份证号</th>
                        <th>注册时间</th>
                        <th>客户身份</th>
                        <th>理财顾问</th>
                        <th>状态</th>
                        <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="item" items="${lists}">
                        <tr>
                            <td>${item.userId}</td>
                            <td>
                                <span>${item.idName}</span>
                            </td>
                            <td>${item.phone}</td>

                            <td>${item.idCode}</td>
                            <td>
                                <fmt:formatDate value="${item.regTime}" pattern="yyyy-MM-dd"/>
                            </td>
                            <td>
                                <c:choose>
                                    <c:when test="${item.identity==0}">
                                        投资者
                                    </c:when>
                                    <c:when test="${item.identity==1}">
                                        代理商
                                    </c:when>
                                    <c:when test="${item.identity==2}">
                                        业务员
                                    </c:when>
                                </c:choose>
                            </td>
                            <td>
                                <c:if test="${item.identity==0}">
                                    <c:choose>
                                        <c:when test="${item.followSaleManId==null||item.followSaleManId<=0}">
                                            未分配理财顾问
                                        </c:when>
                                        <c:otherwise>
                                            ${item.followSaleMan}&nbsp;&nbsp;&nbsp;
                                            <a href="${ctx}/user/set_saleman?id=${item.userId}">修改</a>&nbsp;&nbsp;&nbsp;
                                            <a href="${ctx}/user/set_saleman_log?userid=${item.userId}">分配记录</a>
                                        </c:otherwise>
                                    </c:choose>
                                </c:if>

                            </td>
                            <td>
                                <c:choose>
                                    <c:when test="${item.status == 1}">
                                        正常
                                    </c:when>
                                    <c:when test="${item.status == 0}">
                                        禁用
                                    </c:when>
                                </c:choose>
                            </td>
                            <td>
                                <a href="${ctx}/invest/invest_list?userId=${item.userId}">客户投资记录</a>
                                &nbsp;&nbsp;&nbsp;
                                <c:choose>
                                    <c:when test="${item.identity==0 && item.followSaleManId ==0}">
                                        <a href="${ctx}/user/set_saleman?id=${item.userId}">分配理财顾问</a>
                                    </c:when>
                                </c:choose>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
                <div class="text-center">
                    <ul class="pagination">
                        <paging:paging pageIndex="${pageIndex}" totalPage="${totalPage}" href="${ctx}/user" htmlTag="li"></paging:paging>

                    </ul>
                </div>

            </div>
        </div>

    </form>
</div>
<!------[end]内容区----->

</body>
</html>
